package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCgZqbcMainMapper;
import com.ruoyi.system.domain.SysCgZqbcMain;
import com.ruoyi.system.service.ISysCgZqbcMainService;

/**
 * SysYmdCgBaseService业务层处理
 * 
 * @author SYF
 * @date 2025-05-09
 */
@Service
public class SysCgZqbcMainServiceImpl implements ISysCgZqbcMainService 
{
    @Autowired
    private SysCgZqbcMainMapper sysCgZqbcMainMapper;

    /**
     * 查询SysYmdCgBase
     * 
     * @param fdate SysYmdCgBase主键
     * @return SysYmdCgBase
     */
    @Override
    public SysCgZqbcMain selectSysCgZqbcMainByFdate(String fdate)
    {
        return sysCgZqbcMainMapper.selectSysCgZqbcMainByFdate(fdate);
    }

    /**
     * 查询SysYmdCgBase列表
     * 
     * @param sysCgZqbcMain SysYmdCgBase
     * @return SysYmdCgBase
     */
    @Override
    public List<SysCgZqbcMain> selectSysCgZqbcMainList(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.selectSysCgZqbcMainList(sysCgZqbcMain);
    }

    /**
     * 新增SysYmdCgBase
     * 
     * @param sysCgZqbcMain SysYmdCgBase
     * @return 结果
     */
    @Override
    public int insertSysCgZqbcMain(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.insertSysCgZqbcMain(sysCgZqbcMain);
    }

    /**
     * 修改SysYmdCgBase
     * 
     * @param sysCgZqbcMain SysYmdCgBase
     * @return 结果
     */
    @Override
    public int updateSysCgZqbcMain(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.updateSysCgZqbcMain(sysCgZqbcMain);
    }

    /**
     * 批量删除SysYmdCgBase
     * 
     * @param fdates 需要删除的SysYmdCgBase主键
     * @return 结果
     */
    @Override
    public int deleteSysCgZqbcMainByFdates(String[] fdates)
    {
        return sysCgZqbcMainMapper.deleteSysCgZqbcMainByFdates(fdates);
    }

    /**
     * 删除SysYmdCgBase信息
     * 
     * @param fdate SysYmdCgBase主键
     * @return 结果
     */
    @Override
    public int deleteSysCgZqbcMainByFdate(String fdate)
    {
        return sysCgZqbcMainMapper.deleteSysCgZqbcMainByFdate(fdate);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<SysCgZqbcMain> selectCgZqbcList(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.selectCgZqbcList(sysCgZqbcMain);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<SysCgZqbcMain> selectCgZqbcAllList(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.selectCgZqbcAllList(sysCgZqbcMain);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<SysCgZqbcMain> selectCgZqbcBrandNullList(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.selectCgZqbcBrandNullList(sysCgZqbcMain);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<SysCgZqbcMain> selectCgZqbcAllListAccept(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.selectCgZqbcAllListAccept(sysCgZqbcMain);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<SysCgZqbcMain> selectCgZqbcBrandNullListAccept(SysCgZqbcMain sysCgZqbcMain)
    {
        return sysCgZqbcMainMapper.selectCgZqbcBrandNullListAccept(sysCgZqbcMain);
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectCgZqbcBrands()
    {
        return sysCgZqbcMainMapper.selectCgZqbcBrands();
    }

    @Override
    @DataSource(DataSourceType.SLAVEDW)
    public List<Map<String,Object>> selectCgZqbcBrandsAcccpt()
    {
        return sysCgZqbcMainMapper.selectCgZqbcBrandsAcccpt();
    }
}
